<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>login</title>
</h:head>
<h:body>
	<center>
		<h2>LOGIN</h2>
		<br></br>

		<h:form>
		<f:event listener="#{usuarioMB.limpiarForm()}" type="preRenderView" />
			<p:panelGrid columns="2">
				<h:outputLabel value="NOMBRE DE USUARIO" />
				<h:inputText value="#{usuarioMB.user.nombreUsuario}" maxlength="25"/>

				<h:outputLabel value="PASSWORD" />
				<h:inputSecret value="#{usuarioMB.user.password}" maxlength="25"/>

			</p:panelGrid>
			<h:commandButton value="VOLVER A TIENDA" action="principal"/>
			<h:commandButton action="#{usuarioMB.login}" value="ENTRAR"/>
			<br></br><h:outputLabel value="#{usuarioMB.msg}" />
		</h:form>
	</center>
</h:body>
</html>